<%@ page contentType="text/html; charset=ISO-8859-1" isELIgnored="false" language="java" %>
<%@ page import="java.util.Collection" %>
<%@ page import="avishay.balderman.dao.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 

<%
	final String type =  request.getParameter("type"); 
	Collection<Link> links = LinkHelper.getLinks(type);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head> 
	<title>All links</title> 
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
	<link rel="stylesheet" type="text/css" href="../css/style.css" /> 
</head> 
<body>
	<ul>
		<c:forEach var="link" items="<%= links %>">
        	<li><a href="${link.url}">${link.description}</a></li>
   		</c:forEach>
	</ul>
</body> 
</html>